Get Selected Range
AutomatR.Excel.Activities.GetSelectedRange
The "Get Selected Range" activity in AutomatR is part of the Excel activities package, designed to retrieve the currently selected range in an Excel workbook and store it as a string variable. This activity facilitates dynamic interactions with selected data in Excel, enhancing automation workflows.
Properties
Name | Description |
---|---|
Misc | |
Display Name | The display name of the activity. A display name is automatically generated when you indicate a target. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Get Selected Range" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Range | Returns the range that is currently selected in the workbook sheet. String variables containing the range value (e.g., "A2:D4"). |
How to use:
- Drag and drop the "Get Selected Range" activity onto the workflow.
- Optionally, configure the delay.
- Execute the workflow to retrieve the currently selected range in the Excel workbook.
Example: Consider an example where the "Get Selected Range" activity is used to retrieve the currently selected range in the Excel workbook:
Get Selected Range:
Delay: 2
Range: selectedRange
In this example, the activity retrieves the currently selected range in the Excel workbook, and the range value is stored in the string variable "selectedRange" for further processing in the workflow.
Note: Ensure that the "Get Selected Range" activity is placed within an "Excel Root" activity to establish the Excel context for execution.